Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.DataStorageUtil = undefined;
var exp_DataStorageUtil = /* */function () {
  function _ctor() {
    babel_classCallCheck(this, _ctor);
  }
  babel_createClass(_ctor, null, [{
    key: "getVal",
    value: function getVal(e) {
      var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
      var a = cc.sys.localStorage.getItem(e);
      if (a) {
        return JSON.parse(a);
      } else {
        return _ctor.setVal(e, t), t;
      }
    }
  }, {
    key: "setVal",
    value: function setVal(e, t) {
      cc.sys.localStorage.setItem(e, JSON.stringify(t));
    }
  }]);
  return _ctor;
}();
exports.DataStorageUtil = exp_DataStorageUtil;